<?php

/**
 * This is the model metadata class for table "order_addon_ticket".
 */
class OrderAddonTicketMetadata extends CARMDC
{
	/**
	 * @return string the associated database table name
	 */
	public function tableName()
	{
		return 'order_addon_ticket';
	}

	/**
	 * @return array validation rules for model attributes.
	 */
	public function rules()
	{
		// NOTE: you should only define rules for those attributes that
		// will receive user inputs.
		return array(
			array('type, reimbursement, pay_type', 'numerical', 'integerOnly'=>true),
			array('name, card_num, contact, email', 'length', 'max'=>32),
			array('card_type', 'length', 'max'=>10),
			array('mobile, phone', 'length', 'max'=>11),
			array('insure', 'length', 'max'=>1),
			array('birthday, departure_time', 'safe'),
			// The following rule is used by search().
			// Please remove those attributes that should not be searched.
			array('order_id, type, name, card_type, card_num, birthday, contact, mobile, phone, email, insure, reimbursement, pay_type, departure_time', 'safe', 'on'=>'search'),
		);
	}

	/**
	 * @return array relational rules.
	 */
	public function relations()
	{
		// NOTE: you may need to adjust the relation name and the related
		// class name for the relations automatically generated below.
		return array(
		);
	}

	/**
	 * @return array customized attribute labels (name=>label)
	 */
	public function attributeLabels()
	{
		return array(
			'order_id' => 'Order',
			'type' => '机票类型',
			'name' => '乘机人姓名',
			'card_type' => '证件类型',
			'card_num' => '证件号',
			'birthday' => '乘机人生日',
			'contact' => '联系人姓名',
			'mobile' => 'Mobile',
			'phone' => '备选电话',
			'email' => '电子邮箱',
			'insure' => '保险',
			'reimbursement' => '报销凭证',
			'pay_type' => '付款方式',
			'departure_time' => '机票起飞日期',
		);
	}
}